home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / UTILITY / APPNDL.ARJ / APPNDLXL.DOC next >
Text File  |  1992-08-26  |  16KB  |  372 lines

  1. APPNDLXL by Kirk Barrett Software Engineering copyright 1992
  2.  
  3. APPNDLXL is a program which reads up to 10 text files and appends them
  4. "line by line", with several options, into a new output file.  It is useful
  5. for manipulating columnar reports.  For example, you could merge two day-
  6. by-day reports into one file, extracting only the columns of interest, or
  7. you could  rearrange or delete columns within one report.
  8.  
  9. QUICK START FOR THOSE WHO WON'T READ A MANUAL
  10.  
  11. Look at the example control file.  Copy it to a new name and edit that file
  12. to create a new control file.  Run the program by typing the following from
  13. the DOS prompt:
  14.  
  15.                       APPNDLXL controlfile outputfile
  16. EXPLANATION OF SHAREWARE
  17.  
  18. This program is Shareware.  It is not free.  If, after trying out the
  19. program, you decide to continue to use it, you are obligated to purchase 
  20. the program for $10 from the program's author, Kirk Barrett Software
  21. Engineering, by completing and mailing the following registration form.
  22. Your support is important and greatly appreciated. With it, Shareware
  23. authors are encouraged to design and distribute new products.  Without it,
  24. a great deal of high quality, low cost software will cease to be available.
  25.  
  26. You are encouraged to copy the programs WITH supporting files and share
  27. them freely with others.  You have the luxury of trying out the complete
  28. programs, at your own pace and in the comfort of your own home or
  29. workplace.  This is not a crippled or "demo" copy, but the complete working
  30. version of the program.
  31.  
  32. Why you should pay:
  33.    * You will receive a disk with our two other shareware programs,
  34.      APPNDLXL and STAT, plus a bunch of freeware (see below for a more
  35.      thorough explanation)
  36.    * Technical support - via mail or Compuserve
  37.    * Notification of updates and new products
  38.    * Inexpensive upgrade offers or other deals for registered users only
  39.    * Your input and ideas help shape future products
  40.    * A sense of pride and ownership, in having honestly participated in the
  41.      Shareware revolution
  42.    * You help to keep software prices down, by supporting a      
  43.      distribution method which doesn't rely on expensive advertising
  44.      campaigns.
  45.  
  46. Be aware of the following restrictions, designed to protect the community
  47. of Shareware users and authors, and to prevent greedy people from taking
  48. unfair advantage of the trust, hard work, and good will of Shareware
  49. authors:
  50.  
  51. 1. No price or other consideration may be charged for distribution.
  52. However, a distribution cost may be charged for the cost of the diskettes,
  53. shipping, and handling, not to exceed $7 total (equivalent U.S. dollars).
  54.  
  55. 2. The files and programs on the disks may not be modified nor deleted.
  56.  
  57. 3. The programs cannot be sold as part of some other more inclusive
  58. package.
  59.  
  60. 4. The programs cannot be "rented" or "leased" to others.
  61.  
  62.  
  63. WARRANTY
  64.  
  65. There is no warranty of any kind, and the copyright owner is not liable for
  66. damages of any kind.  By using this software, you agree to these terms.
  67.  
  68. The software and documentation are copyright 1992 by
  69.  
  70.           Kirk Barrett Software Engineering
  71.           179 Westgate Dr.
  72.           Elgin, IL 60123
  73.  
  74. SHAREWARE SOFTWARE BY KIRK BARRETT SOFTWARE ENGINEERING
  75.  
  76. 123IMPRT-- reads a text file and creates a Lotus-importable file (a "comma
  77. and quote delimited" file) according to a template which you specify. 
  78. Works much better than the PARSE command in LOTUS or other spreadsheets.
  79.  
  80. PARSE-- "quick and dirty" way to create a Lotus-importable file.
  81.  
  82. APPDNLXL-- APPNDLXL reads up to 10 text files and appends them "line by
  83. line", with several options, into a new output file.  It is useful for
  84. manipulating columnar reports.  For example, you could merge two day-by-day
  85. reports into one file, extracting only the columns of interest, or you
  86. could  rearrange or delete columns within one report.
  87.  
  88. STAT-- reads a text file containing columns of numbers and computes
  89. statistics on them (sum, average, standard deviation, count, maximum and
  90. minimum).
  91.  
  92. If you purchase any of these products, you will receive unregistered copies
  93. of the others, plus the following for FREE:
  94.  
  95.      o    READSCRN-- reads the current screen and saves it to a file.
  96.      o    LASRHELP-- a package of batch files which facilitates control
  97.           over a HP Laser Jet (set margins, orientation, lines per inch,
  98.           lines per page and more).
  99.      o    ASCII-- displays all characters and their ASCII codes on one
  100.           screen.
  101.      o    GRAFCHAR-- displays all graphic characters and their ASCII codes
  102.           in an easy-to-read format.
  103.      o    FIXFILE-- reads any input file and replaces all non-text
  104.           characters with blanks.
  105.  
  106.  
  107.                         APPNDLXL Registration Form
  108.            Copyright (c) 1992, Kirk Barrett Software Engineering
  109.  
  110.  
  111.         Please make checks payable and mail to:
  112.  
  113.               Kirk R. Barrett
  114.               179 Westgate Dr.
  115.               Elgin, IL
  116.  
  117.                       APPNDLXL Registration Fee: $10
  118.  
  119.                      Name: _____________________________________________
  120.  
  121.  
  122.              Company Name: _____________________________________________
  123.  
  124.         Mailing Address
  125.  
  126.                    Street: _____________________________________________
  127.  
  128.  
  129.         Town, State & Zip: _____________________________________________
  130.  
  131.  
  132.                     Phone: ____________________________________________
  133.  
  134.  
  135.         Do you have a modem? ______________      Disk format  ____ 3.50"
  136.  
  137.                                                               ____ 5.25"
  138.  
  139.         Where did you receive APPNDLXL from?  (Just curious.)
  140.  
  141.  
  142.  
  143.         Any comments or suggestions for this or other programs?:
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150. DESCRIPTION OF APPNDLXL
  151.  
  152.  
  153. APPNDLXL is a program which reads up to 10 text files and appends them
  154. "line by line", with several options, into a new output file.  For the
  155. simplest case (two files), the program reads one line from the first file
  156. and one line from the seconde file.  It then appends the line from the
  157. second file to the end of the line from the first file and writes out the
  158. appended line to a new output file.  It then reads the next line from the
  159. first and from second file and repeats the process.
  160.  
  161. A simple example will best explain the general function of the program. 
  162. Let's say there are two files, A and B, with the contents as shown below.
  163.  
  164. File A
  165.  
  166. 111111111111111111
  167. 222222222222222222
  168. 333333333333333333
  169. 444444444444444444
  170.  
  171. File B
  172.  
  173. aaaaaaaaaaaaaaaaaaaaaaaaaa
  174. bbbbbbbbbbbbbbbbbbbbbbbbbb
  175. cccccccccccccccccccccccccc
  176. dddddddddddddddddddddddddd
  177.  
  178. Running APPNDLXL with files A and B as input will produce a third file with
  179. the following contents
  180.  
  181. 111111111111111111aaaaaaaaaaaaaaaaaaaaaaaaaa
  182. 222222222222222222bbbbbbbbbbbbbbbbbbbbbbbbbb
  183. 333333333333333333cccccccccccccccccccccccccc
  184. 444444444444444444dddddddddddddddddddddddddd
  185.  
  186. The program provides options to select only certain lines in each file and
  187. only certain parts of each line.  
  188.  
  189. You run the program by typing the following from the DOS prompt:
  190.  
  191.                       APPNDLXL controlfile outputfile
  192.  
  193. where     controlfile    is the name of a "control file" which contains the
  194.                          input file names and other information and
  195.  
  196.           outputfile     is the name of the file that will hold the result
  197.                          of the line-by-line append.
  198.  
  199. The control file is a ASCII text file which explains how the input files
  200. should be combined to form the output file.  The control file should be
  201. created by a text editor, or most word processors have the ability to save
  202. as a text or ASCII file.  The control file consists of a series of lines,
  203. each line corresponding to one input file.  The program allows to you
  204. select only certain lines in the input file and only certain part of each
  205. line.  So, each control file line specifies which lines in the
  206. corresponding input file should be processed and which columns should be
  207. extracted, along with a couple of other items.  (In this context, a
  208. "column" is one character wide.  You can determine which columns you want
  209. to extract by editing the input files with a text editor, or with
  210. WordPerfect set to "WordPerfect 4.2 units".)  
  211.  
  212. Information in the  control file is specified in a fixed format.  Each item
  213. is specified in its own field (a block of columns).  The fields are 10
  214. columns wide and start "on the ones" (ie, 21, 31, etc.), except for the
  215. input file name (which is 20 columns wide).  The items that must be
  216. specified in each control file line and the fields in which they must
  217. appear are defined by the following generic control line format. 
  218.  
  219.  
  220. CONTROL LINE FORMAT (The two lines of numbers are not part of the control
  221. file; they are provided as a guide to determine the columns devoted to each
  222. field.)
  223.  
  224.  
  225.          1         2         3         4         5         6         7         8
  226. 12345678901234567890123456789012345678901234567890123456789012345678901234567890
  227. <--input filename--><startlin>< endline><startcol>< endcol ><#Spaces ><PadOnEOF>
  228.  
  229.  
  230. where     
  231. input filename =    name of a text file which serves as input to the
  232.                     program; all the information on this control file line
  233.                     refers to this file.
  234.  
  235. startlin =     line number in this file at which to start the append (ie,
  236.                lines before start line are not included)
  237.  
  238. endline =      line number in this file at which to end the append (ie,
  239.                lines after end line are ignored).  If you want to use the
  240.                entire file, just make endline a very large number.
  241.  
  242. startcol =     column number for each line in this file at which to start
  243.                extracting text 
  244.  
  245. endcol =       column number for each line in this file at which to end   
  246.                extracting text
  247.  
  248. #Spaces =      number of spaces to add after the text that was extracted
  249.                from this file
  250.  
  251. PadOnEOF =     indicates, when the end of this file is reached, if the
  252.                output file should be padded with a block of spaces  where
  253.                the extracted text from this file would normally go. 
  254.                Specify Y if you want to pad, N if you do not.
  255.  
  256. Note that the information in the control file is column specific.  You must
  257. have the correct item in the correct field.  The item can appear anywhere
  258. within the field.  To aid in placement, you can enter a comment line in the
  259. control file with the first character an asterisk.  Here is an example
  260. control file.
  261.  
  262.          1         2         3         4         5         6         7         8
  263. 12345678901234567890123456789012345678901234567890123456789012345678901234567890
  264. *FileName           StartLine EndLine   StartCol  EndCol    #Spaces   PadOnEOF
  265. A                   5         20        7         9         3         Y
  266. B                   1         50        15        30        5         N
  267.  
  268. This control file specifies that each line in the output file will contain
  269. the text in columns 7 through 9 of file A (starting at line 5 in file A and
  270. ending at line 20), followed by 3 spaces, followed by the text in columns
  271. 15-30 of file B (starting at line 1, ending at line 7).  If the end of file
  272. A is reached before the required number of lines are read from file B,
  273. then, for ensuing lines in the output file, the block normally occupied by
  274. the text of file A will be padded with blanks.
  275.  
  276. You may include the same input file more than once in the control file. 
  277. However, if you do so, the start line must be the same for every instance
  278. of the file.  Using the same file more than once allows you to do things
  279. like rearranging columns or deleting columns.
  280.  
  281. USER SUPPORT
  282.  
  283. If you have a problem or suggestion, write to the above address.  I will
  284. try to respond as soon as possible.  I will be happy to modify the program
  285. for you on a contract basis.
  286.  
  287. EXTENDED EXAMPLE
  288.  
  289. Here is a scenario in which this program would be useful.  Let's say you
  290. run a small concession stand selling ice cream, hot dogs, coffee, etc.  Say
  291. you want to know how your sales are affected by the weather.  From your own
  292. records, you have the following daily report of sales of each item
  293. (included as SALES.TXT):
  294.  
  295.            1         2         3         4         5         6         7
  296.   1234567890123456789012345678901234567890123456789012345678901234567890
  297.           Sales in Dollars
  298.        Day Ice Cream  Coffee  Hot Dogs
  299.   07/01/91      125      125       125
  300.   07/02/91      200      200       200
  301.   07/03/91      130      130       130
  302.   07/04/91      868      958       872
  303.          .        .        .         .
  304.          .        .        .         .
  305.          .        .        .         .
  306.   07/30/91       88      146       924
  307.   07/31/91      187      189       245
  308.  
  309.  
  310. From the weather service, you obtain a daily report of rainfall and high
  311. and low temperatures, like this (included as WEATHER.TXT):
  312.  
  313.            1         2         3         4         5         6         7
  314.   1234567890123456789012345678901234567890123456789012345678901234567890
  315.                              Hi          Lo
  316.            Rainfall Temperature Temperature
  317.        Day   inches       Deg F       Deg F
  318.   07/01/91                   80          60
  319.   07/02/91                   81          61
  320.   07/03/91      0.5          78          58
  321.   07/04/91      0.2          90          70
  322.          .        .           .           .
  323.          .        .           .           .
  324.          .        .           .           .
  325.   07/30/91                   73          53
  326.   07/31/91                   71          51
  327.  
  328. To merge these two file, use this control file (included as CONTROL.TXT):
  329.  
  330. *FileName           StartLine EndLine   StartCol  EndCol    #Spaces   Pad
  331. SALES.TXT           1         1000      1         38        3         Y
  332. WEATHER.TXT         1         1000      12        43        3         Y
  333.  
  334. Then enter this command from the DOS prompt:
  335.  
  336.    APPNDLXL CONTROL.TXT OUTPUT.TXT
  337.  
  338. This creates this output file (OUTPUT.TXT):
  339.  
  340.             Sales in Dollars                               Hi          Lo  
  341.                                          Rainfall Temperature Temperature  
  342.        Day Ice Cream  Coffee  Hot Dogs     inches       Deg F       Deg F  
  343.   07/01/91      125      125       125                     80          60  
  344.   07/02/91      200      200       200                     81          61  
  345.   07/03/91      130      130       130        0.5          78          58  
  346.   07/04/91      868      958       872        0.2          90          70  
  347.          .        .        .         .          .           .           .  
  348.          .        .        .         .          .           .           .  
  349.          .        .        .         .          .           .           .  
  350.   07/30/91       88      146       924                     73          53  
  351.   07/31/91      187      189       245                     71          51  
  352.  
  353. You could then use our other shareware program, 123IMPRT, to import this
  354. data into your spreadsheet.  123IMPRT is much easier to use than the LOTUS
  355. parse command. OTHER SHAREWARE SOFTWARE BY KIRK BARRETT SOFTWARE ENGINEERING
  356.  
  357. 123IMPRT-- reads a text file and creates a Lotus-importable file (a "comma
  358. and quote delimited" file) according to a template which you specify. 
  359. Works much better than the PARSE command in LOTUS or other spreadsheets.
  360.  
  361. WARRANTY
  362.  
  363. There is no warranty of any kind, and the copyright owner is not liable for
  364. damages of any kind.  By using this software, you agree to this.
  365.  
  366. The software and documentation are copyright 1992 by
  367.  
  368.           Kirk Barrett Software Engineering
  369.           179 Westgate Dr.
  370.           Elgin, IL 60123
  371.  
  372.